package com.lvhx.springboot.springbatch.listener;

import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.annotation.AfterStep;
import org.springframework.batch.core.annotation.BeforeStep;

/**
 * @auther 吕宏旭
 * @date 2019/9/5 12:57
 */
public class StepExecListener {
    @BeforeStep
    public void beforJob(JobExecution jobExecution) {
        System.out.println("===== step before start time: " + jobExecution.getStartTime());
    }

    @AfterStep
    public void afterJob(JobExecution jobExecution) {
        System.out.println("===== step after end time: " + jobExecution.getEndTime());
    }
}
